package com.adams.custom.page.util;

import java.util.Map;

import com.adams.encache.mechanism.CacheUtil;

public class ViewCacheUtil
{

	/**
	 * Description : 获取配置信息缓存
	 * 
	 * @param cacheKey
	 * @return
	 * 
	 */
	@SuppressWarnings("unchecked")
	public static Map getConfigDataCacheMap(String cacheKey)
	{
		return CacheUtil.getCacheMap(CacheUtil.VIEW_CONFIG_DATA_CACHE_NAME,
				cacheKey);
	}

	/**
	 * Description : 放入配置信息缓存
	 * 
	 * @param cacheKey
	 * @param cacheObject
	 * 
	 */
	@SuppressWarnings("unchecked")
	public static void put2ConfigDataCacheMap(String cacheKey, Map cacheObject)
	{
		CacheUtil.put2DataCacheMap(CacheUtil.VIEW_CONFIG_DATA_CACHE_NAME,
				cacheKey, cacheObject);
	}

	/**
	 * Description : 获取服务层缓存
	 * 
	 * @param cacheKey
	 * @return
	 * 
	 */
	@SuppressWarnings("unchecked")
	public static Map getServiceCacheMap(String cacheKey)
	{
		return CacheUtil.getCacheMap(CacheUtil.VIEW_SERVICE_CACHE_NAME,
				cacheKey);
	}

	/**
	 * Description : 放入服务层缓存
	 * 
	 * @param cacheKey
	 * @param cacheObject
	 * 
	 */
	@SuppressWarnings("unchecked")
	public static void put2ServiceCacheMap(String cacheKey, Map cacheObject)
	{
		CacheUtil.put2DataCacheMap(CacheUtil.VIEW_SERVICE_CACHE_NAME, cacheKey,
				cacheObject);
	}
}
